<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .first {
            height: 400px;
            width: 400px;
            background-color: #c00f0f;
            position: relative;
        }
        .second {
           height: 200px;
           width: 200px;
           background-color: aquamarine;
           position: absolute;
           top:50%;
           left:50%;
transform
        }
    </style>
</head>
<body>
    <div class="first">
        <div class="second">

        </div>
    </div>
</body>
</html>